@extends('admin.layout-tool')

<?php $menu = 'picture'; ?>

@section('body')
    <div class="page-header">
        <h4>上传图片</h4>
    </div>

    <div class="">      
        <form class="form-horizontal" method="POST" action="" enctype="multipart/form-data">
            {{ csrf_field() }}
            <input id="path" class="form-control" name="path" value="../storage/app/public/" type="hidden" />
            <div class="form-group">
                <label for="title" class="col-md-2 control-label">标题</label>

                <div class="col-md-6">
                    <input id="title" type="text" class="form-control" name="title" >
                </div>
            </div>

            <div class="form-group">
                <label for="file" class="col-md-2 control-label">请选择文件</label>

                <div class="col-md-6">
                    <input id="file" type="file" class="form-control" name="source" >
                </div>
            </div>

            <div class="form-group">
                <label for="description" class="col-md-2 control-label">描述</label>

                <div class="col-md-6">
                    <textarea id="description" type="text" class="form-control" name="description" ></textarea>
                </div>
            </div>


            <div class="form-group">
                <div class="col-md-8 col-md-offset-2">
                    <button type="submit" class="btn btn-primary" @if ($user->role == 'user' ) disabled="true" @endif>
                        确认上传
                    </button>
                </div>
            </div>
        </form> 
    </div>
@endsection
